You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.4 KiB
1 lines
4.4 KiB
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[203],{3863:function(e,t,n){Promise.resolve().then(n.t.bind(n,8877,23)),Promise.resolve().then(n.bind(n,7620))},7620:function(e,t,n){"use strict";n.d(t,{MainNav:function(){return c}});var r=n(7437),a=n(2265);function o(e){let{basePath:t="",locale:n="zh-CN"}=e;return(0,r.jsx)("button",{onClick:()=>{let e=window.location.pathname.split("/").filter(Boolean),t="en"===e[0]?"en":"zh-CN"===e[0]?"zh-CN":null,n="en"===t?"zh-CN":"en";t?e[0]=n:e.unshift(n);let r="/"+e.join("/");window.location.assign(r)},className:"bg-white border border-[#ccd5e4] text-[#0f3c88] px-2.5 py-1.5 rounded-[6px] text-xs md:text-sm tracking-[0.14em] uppercase cursor-pointer hover:bg-[#0f3c88] hover:text-white active:scale-95 transition-all duration-150 touch-manipulation",children:"en"===n?"CN":"EN"})}function c(e){let{items:t,basePath:n="",locale:c="zh-CN"}=e,[s,i]=(0,a.useState)(!1),[l,d]=(0,a.useState)("");(0,a.useEffect)(()=>{let e=()=>{d(window.location.pathname)};e(),window.addEventListener("popstate",e);let t=t=>{let n=t.target.closest("a");n&&n.href&&setTimeout(()=>{e()},100)};return document.addEventListener("click",t),()=>{window.removeEventListener("popstate",e),document.removeEventListener("click",t)}},[]);let h="en"===c?"SensiGuard Technologies":"衡感智能",f=e=>{if(!l||e.startsWith("#"))return!1;let t="".concat(n).concat(e);return"/"===e||""===e?l===n||l==="".concat(n,"/"):l===t||l.startsWith("".concat(t,"/"))};return(0,r.jsxs)("header",{className:"w-full fixed top-0 left-0 right-0 z-50 bg-white/95 border-b border-[#dfe4ee] backdrop-blur-md shadow-[0_2px_16px_rgba(14,37,74,0.08)]",children:[(0,r.jsxs)("div",{className:"max-w-[1280px] mx-auto px-4 lg:px-8 py-3.5 md:py-5 flex items-center justify-between",children:[(0,r.jsxs)("a",{href:n||"/",className:"flex items-center gap-2 md:gap-3 no-underline flex-shrink-0",children:[(0,r.jsx)("img",{src:"/img/Log.jpg",alt:h,className:"h-8 w-auto md:h-10"}),(0,r.jsx)("div",{className:"font-semibold text-[#0f1f3f] text-xs sm:text-sm md:text-base hidden sm:block ".concat("en"===c?"tracking-[0.12em] uppercase":"tracking-[0.08em]"),children:h})]}),(0,r.jsx)("nav",{className:"hidden md:flex items-center gap-5 lg:gap-7",children:t.map(e=>{let t="/contact"===e.href,a=e.href.startsWith("#")?e.href:"".concat(n).concat(e.href),o=f(e.href);return(0,r.jsxs)("a",{href:a,className:"no-underline transition-all duration-200 text-sm lg:text-base leading-none ".concat(t?"inline-flex items-center justify-center px-4 lg:px-5 py-2 rounded-full font-medium tracking-[0.1em] ".concat(o?"bg-[#0f3c88] text-white shadow-[0_6px_14px_rgba(15,60,136,0.25)]":"border border-[#0f3c88] text-[#0f3c88] hover:bg-[#0f3c88] hover:text-white"):"relative group px-2 lg:px-3 py-1 tracking-[0.1em] ".concat(o||"/"===e.href?"text-[#0f3c88]":"text-[#1b1f2a] hover:text-[#0f3c88]")),children:[e.label,!t&&(0,r.jsx)("span",{className:"pointer-events-none absolute left-0 right-0 -bottom-2 h-[2px] rounded-full transform transition-all duration-200 ".concat(o?"opacity-100 scale-100 bg-[#0f3c88]":"opacity-0 scale-75 group-hover:opacity-100 group-hover:scale-100 group-hover:bg-[#0f3c88]")})]},e.label)})}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(o,{basePath:n,locale:c}),(0,r.jsx)("button",{onClick:()=>i(!s),className:"md:hidden p-2 text-[#1c2538] hover:text-[#0f3c88] focus:outline-none","aria-label":"Toggle menu",children:(0,r.jsx)("svg",{className:"w-6 h-6",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",stroke:"currentColor",children:s?(0,r.jsx)("path",{d:"M6 18L18 6M6 6l12 12"}):(0,r.jsx)("path",{d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),s&&(0,r.jsx)("div",{className:"md:hidden bg-white border-t border-[#dfe4ee] max-h-[calc(100vh-80px)] overflow-y-auto shadow-[0_10px_24px_rgba(14,37,74,0.12)]",children:(0,r.jsx)("nav",{className:"max-w-[1200px] mx-auto px-4 md:px-6 py-4 space-y-2",children:t.map(e=>{let t="/contact"===e.href,a=e.href.startsWith("#")?e.href:"".concat(n).concat(e.href),o=f(e.href);return(0,r.jsx)("a",{href:a,className:"block py-2 px-2 rounded-md ".concat(t?"border ".concat(o?"border-transparent bg-[#0f3c88] text-white":"border-[#0f3c88] text-[#0f3c88] bg-transparent"):o?"text-[#0f3c88] font-medium bg-[#eef3fb]":"text-[#1d2332] hover:text-[#0f3c88] hover:bg-[#f3f6fb]"),onClick:()=>i(!1),children:e.label},e.label)})})})]})}},8877:function(){}},function(e){e.O(0,[404,971,23,744],function(){return e(e.s=3863)}),_N_E=e.O()}]);
|